<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateOrderPayAddressTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('order_pay_address', function(Blueprint $table)
		{
			$table->integer('id', true);
			$table->integer('address_id')->nullable()->comment('地址id');
			$table->text('address_object', 65535)->nullable()->comment('地址的序列化 防止用户改变自己的地址');
			$table->timestamps();
			$table->string('consignee', 60)->nullable();
			$table->string('country', 60)->nullable();
			$table->string('province', 60)->nullable();
			$table->string('city', 60)->nullable();
			$table->string('district', 120)->nullable();
			$table->string('address', 120)->nullable();
			$table->string('mobile', 60)->nullable();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('order_pay_address');
	}

}
